<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <style>
    @media screen and (min-width:600px) {
      h1 {
        color: red;
      }
    }
    @media screen and (min-width:800px) {
      h1 {
        color: green;
      }
    }
    @media print {
      h1 {
        color: rgb(214, 20, 20);
      }
    }
  </style>
  <h1>媒体查询练习</h1>
</body>

</html>